<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>修改密码</title>
</head>
<body>
修改密码:
<hr />
    <form action="" method="post" onsubmit="return ver();">
        原 密 码：<input type="password" name="old" value="" required/><br/>
        新 密 码：<input type="password" name="password" id="password" required><br/>
        确认新密码：<input type="password" name="new" id="new" required><br/>
        <b style="color: red" id="error"></b>
        <input type="submit" value="提交" />
        <input type="reset" value="重置" />
    </form>

<script src="<c:url value="/assets/lib/js/jquery.js" />"></script>
<script type="text/javascript">
    console.log('${ctx}');
    function ver() {
        if($("#password").val() == $("#new").val()){
            $("#error").html("");
            return true;
        }
        $("#error").html("两次密码不一致请重新输入");
        return false;
    }
</script>
</body>
</html>
